package com.thermal.thermal_inspection.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import com.thermal.thermal_inspection.entity.Batch;
import java.util.List;

@Repository
@Mapper
public interface BatchMapper {
    /**
     * 添加批次
     */
    Integer addBatch(Batch batch);
    /**
     * 获取所有批次
     */
    List<Batch> getBatchs();
    /**
     * 根据BatchName查询批次
     */
    Batch getBatchByName(String batchName);
    /**
     * 通过batchId来查询批次
     */
    public Batch getBatchById(int batchId);
    /**
     * 获取所有临时任务批次的id
     */
    public List<Batch> getBatchOfNoBatch();
    /**
     * 更新Batch的信息
     */
    public Integer updateBatch(int batchId,String batchName);
    /**
     * 删除Batch
     */
    public Integer deleteBatch(int batchId);
    /**
     * 根据inspectionWorkId删除Batch
     */
    public Integer deleteBatchByWorkId(int inspectionWorkId);
}
